package com.wtwd.device.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author mjy
 * @since 2021-09-03
 */
@ApiModel(value="SleepRecord对象", description="")
public class SleepRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "睡眠记录主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "设备id",required = true)
    private Long deviceId;

    @ApiModelProperty(value = "时间，格式：yyyy-MM-dd",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date time;

    @ApiModelProperty(value = "睡眠总时长",required = true)
    private Integer sleepTime;

    @ApiModelProperty(value = "深睡时长，单位分钟",required = true)
    private Integer deepSleepTime;

    @ApiModelProperty(value = "浅睡时长，单位分钟",required = true)
    private Integer lightSleepTime;

    @ApiModelProperty(value = "醒来次数",required = true)
    private Integer wakeFrequency;

    @ApiModelProperty(value = "记录一天各个时间段的数据集",required = true)
    private List<SleepInfo> sleepInfoList;

    @ApiModelProperty(value = "上传时间",required = true)
    private Long uploadTime;

    private String sleepInfo;

    public Long getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Long uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getSleepTime() {
        return sleepTime;
    }

    public void setSleepTime(Integer sleepTime) {
        this.sleepTime = sleepTime;
    }

    public Integer getDeepSleepTime() {
        return deepSleepTime;
    }

    public void setDeepSleepTime(Integer deepSleepTime) {
        this.deepSleepTime = deepSleepTime;
    }

    public Integer getLightSleepTime() {
        return lightSleepTime;
    }

    public void setLightSleepTime(Integer lightSleepTime) {
        this.lightSleepTime = lightSleepTime;
    }

    public Integer getWakeFrequency() {
        return wakeFrequency;
    }

    public void setWakeFrequency(Integer wakeFrequency) {
        this.wakeFrequency = wakeFrequency;
    }

    public String getSleepInfo() {
        return sleepInfo;
    }

    public void setSleepInfo(String sleepInfo) {
        this.sleepInfo = sleepInfo;
    }

    public List<SleepInfo> getSleepInfoList() {
        return sleepInfoList;
    }

    public void setSleepInfoList(List<SleepInfo> sleepInfoList) {
        this.sleepInfoList = sleepInfoList;
    }

    @Override
    public String toString() {
        return "SleepRecord{" +
                "id=" + id +
                ", deviceId=" + deviceId +
                ", time=" + time +
                ", sleepTime=" + sleepTime +
                ", deepSleepTime=" + deepSleepTime +
                ", lightSleepTime=" + lightSleepTime +
                ", wakeFrequency=" + wakeFrequency +
                ", sleepInfoList=" + sleepInfoList +
                ", uploadTime=" + uploadTime +
                ", sleepInfo='" + sleepInfo + '\'' +
                '}';
    }
}
